<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/



Route::get('/login', 'AdminController@login');
Route::post('/loginAction', 'AdminController@loginAction');
// 退出登录
Route::get('/loginOut', 'AdminController@loginOut');
// 数据概览
Route::get('/', 'CountController@allCount')->middleware('login');
// 收支统计
Route::get('/finance', 'CountController@finance')->middleware('login');
// 按月统计
Route::post('/count/month', 'CountController@monthCount')->middleware('login');
// 店铺详情
Route::get('/shopDetails', 'MealShopController@details')->middleware('login');
// 饭卡创建
Route::get('/mealCardDesign', 'MealCardController@mealCardDesign')->middleware('login');
// 餐饮商家用户账号列表
Route::get('/userShopList', 'UserAdminController@userShopList')->middleware('login');
// 普通用户列表
Route::get('/userList', 'UserAdminController@userList')->middleware('login');
// 存在购卡意向用户
Route::get('/buycard/but/users', 'UserAdminController@userListBuyCard')->middleware('login');
// 所有用户列表
Route::get('/userAll', 'UserAdminController@userAll')->middleware('login');
// 饭卡展示
Route::get('/manageCard', 'MealCardController@manageCard')->middleware('login');
// 身份证审核页
Route::get('/userIdentification/{userid}', 'UserAdminController@userIdentification')->middleware('login');
// 营业执照审核页
Route::get('/userBusinessaction/{userid}', 'UserAdminController@userBusinessaction')->middleware('login');
// 食品安全审核页
Route::get('/userFoodpermitaction/{userid}', 'UserAdminController@userFoodpermitaction')->middleware('login');
// 证件审核列表
Route::get('/userIdentifiList','UserAdminController@userIdentifiList')->middleware('login');
// 身份证审核
Route::post('/identificationCertificate','UserAdminController@identificationCertificate')->middleware('login');
// 营业执照审核
Route::post('/businessLicenseAudit','UserAdminController@businessLicenseAudit')->middleware('login');
// 食品安全审核
Route::post('/foodSafetyAudit','UserAdminController@foodSafetyAudit')->middleware('login');
// 商家列表
Route::get('/shopList','MealShopController@shopList')->middleware('login');
// 提现申请
Route::get('/extractList','MealShopController@extractList')->middleware('login');
// 订单列表
Route::get('/orderListAll','MealOrderController@orderListAll')->middleware('login');
// 今日订单
Route::get("/orders/today",'MealOrderController@dayorders')->middleware('login');
// 提现处理操作
Route::post('/extractAction','MealShopController@extractAction')->middleware('login');
// 套餐卡出售订单
Route::get('/cardSellorder','MealCardController@orderList')->middleware('login');
// 本周数据获取
Route::post('/weekCount','CountController@weekCount')->middleware('login');
// 创建二维码
Route::get('/createQrcode','MealShopController@createQrcode')->middleware('login');
// 执行创建
Route::post('/actionCreatecode','MealShopController@actionCreatecode')->middleware('login');
// 发布版本
Route::get('/versionRelease','MealAppController@versionRelease')->middleware('login');
// APP首页内容编辑
Route::get('/homePageEdit','MealAppController@homePageEdit')->middleware('login');
// 头条内容发布
Route::post('/todayNewsAdd','MealAppController@todayNewsAdd')->middleware('login');
// 添加饭卡
Route::post('/cardCreateAction','MealCardController@cardCreateAction')->middleware('login');
// 修改店铺营业状态
Route::post('/edit-shopstatus','MealShopController@editStatus')->middleware('login');
// 通过店铺账号搜索
Route::post('/search-shoptel','MealShopController@searchTel')->middleware('login');
// 修改添加轮播图 
Route::post('/broadcastEdit','MealAppController@broadcastEdit')->middleware('login');
// 删除轮播图
Route::post('/broadcastDel','MealAppController@broadcastDel')->middleware('login');
// 用户详情
Route::get('/user-details','UserAdminController@userDetails')->middleware('login');
// 配送订单
Route::get('/delivery/order','MealOrderController@deliveryOrder')->middleware('login');
// 今日配送订单
Route::get('/delivery/order/today','MealOrderController@deliveryOrderToday')->middleware('login');
// 饭卡信息
Route::post('/getcard-info','MealCardController@cardInfo')->middleware('login');
// 修改饭卡信息
Route::post('/updateCardAction','MealCardController@updateCard')->middleware('login');
// 饭卡排序
Route::post('/card-sort','MealCardController@cardSortAction')->middleware('login');
// 赠予饭卡
Route::get('/card/gift','MealCardController@giftCard')->middleware('login');
// 赠予饭卡
Route::post('/card/gift/action','MealCardController@giftCardAction')->middleware('login');
// 撤回订单
Route::post('/cancel-order','MealOrderController@orderClean')->middleware('login');
// 统计提现总额
Route::get('/extractCount','CountController@extractCount')->middleware('login');
// 用户反馈信息
Route::get('/feedback','UserAdminController@userFeedback')->middleware('login');
// 修改餐品图片 
Route::post('/editCateImg','MealShopController@editCateImg')->middleware('login');
// 修改或添加餐品
Route::post('/save/cate/info','MealShopController@createCate')->middleware('login');
// 修改头像
Route::post('/editShopInfo','MealShopController@editShopInfo')->middleware('login');
// 
Route::get('/selectCardOnce','UserAdminController@selectCardOnce')->middleware('login');
// 饭卡添加次数
Route::post('/card/addOne','MealCardController@addOne')->middleware('login');
// 删除饭卡
Route::post('/card/delete','MealCardController@delCard')->middleware('login');
// 管理员添加
Route::get('/system/create','SystemController@add')->middleware('login');
// 执行添加
Route::post('/system/create/action','SystemController@addAction')->middleware('login');
// 管理员列表
Route::get('/system/list','SystemController@list')->middleware('login');
// 修改分享金额
Route::post('/system/share/account','WeChatController@editAccount')->middleware('login');
// 活动设置
Route::get('/system/set/huodong','SystemController@huodongSet')->middleware('login');
// 官网内容编辑
Route::get('/edit/official','SystemController@official')->middleware('login');
// 编辑
Route::post('/system/official/edit','SystemController@editOfficial')->middleware('login');
// 加盟申请
Route::get('/get/joins','UserAdminController@getJoin')->middleware('login');
// 商圈列表
Route::get('/get/circle/list','MealShopController@circlelist')->middleware('login');
// 可视化商圈
Route::get('/get/circle/view','MealShopController@circleView')->middleware('login');
// 添加商圈
Route::post('/add/circle','MealShopController@circleAdd')->middleware('login');
// 店铺圈内排序
Route::post('/edit/shop/circle/sort','MealShopController@circleSort')->middleware('login');
// 修改店铺定位
Route::post('/edit/shop/position','MealShopController@editPosition')->middleware('login');
// 获取所有商圈
Route::get('/get/circle/all','MealShopController@getAllCircle')->middleware('login');
// 删除商圈
Route::post('/del/circle','MealShopController@delCircle')->middleware('login');
// 修改饭店商圈
Route::post('/edit/shop/circle','MealShopController@editCircle')->middleware('login');
// 修改用户商圈
Route::post('/edit/user/circle','UserAdminController@editCircle')->middleware('login');
// 修改饭店企业
Route::post('/edit/shop/company','MealShopController@editCompany')->middleware('login');
// 搜索商圈
Route::post('/search/circle','MealShopController@circleSearch')->middleware('login');
// 搜索企业
Route::post('/search/company','MealShopController@companySearch')->middleware('login');
// 修改饭卡图
Route::post('/edit/app/cardimg','MealAppController@defaultCardImg')->middleware('login');
// 饭卡全额退款
Route::post('/meal/card/tuikuan','MealCardController@tuikuan')->middleware('login');
// 商户数据下载
Route::get('/download/shop/list','MealShopController@dumpExcel')->middleware('login');
// 分享红包列表
Route::get('/redpack/list','MealOrderController@redpackList')->middleware('login');

// 添加卡券
Route::get('/coupon/release','CouponController@release')->middleware('login');
Route::post("/coupon/do/release","CouponController@doRelease")->middleware('login');
Route::any("/coupon/upload","CouponController@upload");
Route::any("/manageCoupon","CouponController@manageCoupon");
Route::any("/coupon/details","CouponController@couponDetail");
Route::any("/coupon/edit","CouponController@editCoupon");
Route::any("/coupon/notifyurl","CouponController@notifyurl");
Route::any("/coupon/order/list","CouponController@buyList");
Route::any("/coupon/shop/list","CouponController@shoplist");
Route::any("/coupon/extract/list","CouponController@extractList");
Route::any("/coupon/extract/action","CouponController@extractAction");
Route::any("/coupon/shop/detail","CouponController@shopDetail");
Route::any("/coupon/shop/fabu/list","CouponController@fabushoplist");
Route::any("/coupon/item/del","CouponController@delCoupon");

// 用户协议
Route::any("/user/agreement","WeChatController@agreement");

Route::any("/edit/user/agreement","SystemController@userAgreement")->middleware('login');

// 测试
Route::get('/shopqrcode','UserAdminController@shopqrcode');
// Route::get('/test/send','WeChatController@test');
Route::get('/test','MealOrderController@test');
Route::get('/company/take','MealShopController@takeView');
Route::post('/company/take/action','MealShopController@takeAction');